﻿<controls:ChildWindow
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                      xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
                      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="GiveAQuiz.QuizManager.Views.QuizInfoView"
                      Width="640"
                      Height="479"
                      Title="Quiz Details" FontFamily="Trebuchet MS" FontSize="16">
  <Grid x:Name="LayoutRoot"
        Margin="2">
    <Grid.RowDefinitions>
      <RowDefinition />
      <RowDefinition Height="Auto" MinHeight="35" />
    </Grid.RowDefinitions>

    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="0.25*" />
        <ColumnDefinition Width="0.75*" />
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" MinHeight="62" />
        <RowDefinition Height="18" />
        <RowDefinition Height="Auto" MinHeight="34" />
        <RowDefinition Height="Auto" MinHeight="20" />
        <RowDefinition Height="Auto" MinHeight="184" />
        <RowDefinition Height="Auto" MinHeight="20" />
        <RowDefinition Height="Auto" MinHeight="28" />
        <RowDefinition Height="Auto" MinHeight="99" />
      </Grid.RowDefinitions>
      <TextBlock Margin="8,8,-118,0"
                 TextWrapping="Wrap"
                 Text="Quiz Details"
                 FontSize="32" />
      <TextBlock Margin="8"
                 TextWrapping="Wrap"
                 Text="Name:"
                 Grid.Row="2"
                 Grid.RowSpan="1" />
      <TextBox Grid.Column="1"
               Margin="8,8,8,0"
               Grid.Row="2"
               TextWrapping="Wrap"
               Text="{Binding QuizDefinition.QuizName, Mode=TwoWay}" />
      <TextBlock Margin="8,0"
                 TextWrapping="Wrap"
                 Text="(Name is visibile to test takers)"
                 Grid.Row="3"
                 Grid.RowSpan="1"
                 Grid.Column="1"
                 FontStyle="Italic" />
      <TextBlock Margin="8"
                 TextWrapping="Wrap"
                 Text="Description:"
                 Grid.Row="4" />
      <TextBox Grid.Column="1"
               Margin="8"
               Grid.Row="4"
               TextWrapping="Wrap"
               Text="{Binding QuizDefinition.Description, Mode=TwoWay}" />
      <TextBlock Margin="8,0"
                 TextWrapping="Wrap"
                 Text="(Description that can be seen by test takers)"
                 Grid.Row="5"
                 Grid.RowSpan="1"
                 Grid.Column="1"
                 FontStyle="Italic" />
      <TextBlock Margin="8,0,8,8"
                 TextWrapping="Wrap"
                 Text="Time Limit:"
                 Grid.Row="6"
                 Grid.RowSpan="1" Height="19" VerticalAlignment="Bottom" />
      <toolkit:NumericUpDown Grid.Column="1"
                             Margin="8,0,8,1"
                             Grid.Row="6"
                             Minimum="0"
                             Value="{Binding QuizDefinition.TimeLimitInMinutes, Mode=TwoWay}" VerticalAlignment="Bottom" d:LayoutOverrides="Height" />
      <TextBlock Margin="8,0"
                 TextWrapping="Wrap"
                 Text="(In minutes; use zero for no time limit)"
                 Grid.Row="7"
                 Grid.RowSpan="1"
                 Grid.Column="1"
                 FontStyle="Italic" Height="20" VerticalAlignment="Top" />

    </Grid>
    <Button x:Name="OKButton"
            Content="OK"
            Click="OKButton_Click"
            HorizontalAlignment="Right"
            Margin="0,12,0,0"
            Grid.Row="1" />
  </Grid>
</controls:ChildWindow>